package cn.springcloud.fix.demo.common;

public class ABTest {

    public static void main(String[] args) {
        B b = new B();
        b = new A();
        // b = new A();
    }

    static class A extends B {
        static {
            System.out.println("aa");
        }

        public A() {
            System.out.println("a");
        }
    }

    static class B {
        static {
            System.out.println("bb");
        }

        public B() {
            System.out.println("b");
        }
    }
}
